﻿package com.example.administrator.bouxuegu5;

import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.WindowManager;
import android.widget.VideoView;

public class VideoPlayActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
              getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
        setContentView(R.layout.activity_video_play);
                setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
        String path=getIntent().getStringExtra("videoPath");
        VideoView vv_paly=findViewById(R.id.vv_play);
        if(path.equals("abc")){
            String uri="android.resource://"+getPackageName()+"/"+R.raw.mmyu;
            vv_paly.setVideoPath(uri);
            vv_paly.start();
        }

    }
}
